﻿CREATE PROCEDURE [dbo].[proc_AppMenu_Delete]
	(
		@MenuId int
	)
AS
begin
	declare @Fid int
	Select @Fid=ParentId From AppMenu Where MenuId=@MenuId
	if(@Fid=0)
	begin
		Delete From AppMenu Where MenuId=@MenuId Or ParentId=@MenuId
	end
	else
	begin
		Delete From AppMenu Where MenuId=@MenuId
	end
end
	RETURN
